<template>
    <div class="ShopCarContent">
      <div class="wrap">
        <div class="header border-top border-bottom">
          <p class="header__title">购物车</p>
          <p class="header__clear">清空</p>
        </div>
        <div class="scrollWrap" ref="scrollWrap">
          <ul class="list">
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
            <li class="item border-bottom">list</li>
          </ul>
        </div>
      </div>
      <div class="mask" @click="hideContent"></div>
    </div>
</template>

<script>
import Bscroll from 'better-scroll'
export default {
  name: 'ShopCarContent',
  mounted () {
    this.$nextTick(() => {
      this.scroll = new Bscroll(this.$refs.scrollWrap, {
        mouseWheel: true, click: true, tap: true
      })
    })
  },
  methods: {
    hideContent () {
      this.$emit('hideContent')
    }
  }
}
</script>

<style lang='scss' scoped>
  .wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 96px;
    min-height: 176px;
    z-index: 1;
    background: #fff;
    .header {
      height: 80px;
      width: 100%;
      padding: 0 36px;
      line-height: 80px;
      background: #f3f5f7;
      .border-top::before,
      .border-bottom::before {
        border-color: rgba(7, 17, 27, .1);
      }
      .header__title {
        float: left;
      }
      .header__clear {
        float: right;
        color: #25a4bb;
      }
    }
    .scrollWrap {
      overflow: hidden;
      max-height: 530px;
    }
    .list {
      padding: 0 36px;
      background: #fff;
      .item {
        line-height: 96px;
        &.border-bottom {
          border-color: rgba(7, 17, 27, .1);
        }
      }
    }
  }
  .mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 17, 27, .6);
    filter: blur(10px);
  }
</style>
